In chemistry, residue is the material remaining after a distillation or an evaporation, or to a portion of a larger molecule, such as a methyl group. It may also refer to the undesired byproducts of a reaction.
In biochemistry and molecular biology, a residue refers to a specific monomer within the polymeric chain of a polysaccharide, protein or nucleic acid. For example, one might say, "This protein consists of 118 amino acid residues" or "The histidine residue is considered to be basic due to its imidazole ring." Note that a residue is different from a moiety, which, in the above example would be constituted by the imidazole ring or "the imidazole moiety".
Note the origin of this usage: during the process by which monomeric building blocks (e.g. amino acids) are strung together into a polymeric chain (e.g. a protein), some material (typically adding up to one molecule of water) is discarded from each building block, and only a "residue" of the building block ends up in the finished product.
For instance, a residue is an individual amino acid in a peptide chain.